<template>
	<view class="body">
		<u-navbar
			title="支付成功"
			title-color="#000"
			:title-bold="true"
			:border-bottom="false"
			:background="{ background: '#ffffff' }"
			:back-icon-color="'#000'"
			:is-back="true"
		></u-navbar>

		<view class="flex flex-column align-center flex-around main">
			<image src="/static/order/pay.png" style="width: 428rpx; height: 348rpx"></image>

			<view class="flex flex-column align-center flex-center">
				<view class="text">{{ str }}支付成功</view>
				<view class="preic">¥{{ prcie }}</view>
			</view>

			<view class="btn" @click="order()">查看订单详情</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			prcie: 0,
			str: '优惠券'
		};
	},
	onLoad(o) {
		if (o.prcie) {
			this.prcie = o.prcie;
		}
		if (o.moneyType) {
			this.str = o.moneyType == 1 ? '余额' : '优惠券';
		}
	},
	methods: {
		order() {
			uni.redirectTo({
				url: '/pages/order/order?index=1'
			});
		}
	}
};
</script>

<style lang="scss" scoped>
.body {
	height: 100vh;
	background-color: #fff;
}

.main {
	height: 45%;
	margin-top: 25%;
	.text {
		font-size: 28rpx;
		color: #333333;
		margin-bottom: 20rpx;
	}

	.preic {
		font-weight: 600;
		font-size: 50rpx;
		color: #333333;
	}

	.btn {
		width: 236rpx;
		height: 56rpx;
		background: #f88725;
		border-radius: 70rpx 70rpx 70rpx 70rpx;

		font-size: 28rpx;
		color: #ffffff;

		display: flex;
		justify-content: center;
		align-items: center;
	}
}
</style>
